import 'dart:core';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
void main() {
  runApp(
    MaterialApp(home: TextHomePage()),
  );
}

class TextHomePage extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    return TextHomePageState();
  }
}

class TextHomePageState extends State<TextHomePage> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        home: Scaffold(
            appBar: AppBar(
              title: const Text("listview"),
            ),
            body: Center(
              child: GestureDetector(
                onTap: (){
                  print("点击");
                },
                child: Container(
                  width: 200,
                  color: Colors.yellow,
                  height: 200,
                  alignment: Alignment.center,
                  child: IgnorePointer( //忽略点击事件
                    child: GestureDetector(
                      onTap: (){
                        print("dianjia");
                      },
                      child: Container(
                        width: 100,
                        height: 100,
                        color: Colors.blue,
                      ),
                    ),
                  ),
                ),
              ),
            )
        )
    );
  }
}
